/**
 * 
 */
package com.dingjian.meal.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.dingjian.base.dao.impl.BaseDaoImpl;
import com.dingjian.meal.dao.MealRecordDao;

/**
 *
 * @author FengMy
 * @since 2012-6-8
 */
@Component(value="mealRecordDao")
public class MealRecordDaoImpl extends BaseDaoImpl implements MealRecordDao {

	@Override
	protected String getNameSpace() {
		return "com.dingjian.meal.dao.MealRecordDao";
	}

	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> summary(Map<String, Object> param) {
		return getSqlSession().selectList(getNameSpace()+".summary", param);
	}
	
	public boolean exists(Map<String, Object> param) {
		int c = (Integer) getSqlSession().selectOne(getNameSpace()+".exists", param);
		return c > 0;
	}
}
